<?php
	require_once(dirname(__FILE__).'/inc/config.inc.php');IsModelPriv('member');
    $gourl  = 'salesman.php';
    $id = empty($_GET['id']) ? '' : $_GET['id'];
    if(!empty($id)){
        $sale = $dosql->GetOne("SELECT * FROM dyspw_salesman WHERE id='$id'");
        if($sale['state'] == 0){
            $sale_up = $dosql->ExecNoneQuery("UPDATE dyspw_salesman SET state = 1 WHERE `id`={$sale['id']}");
            if($sale_up){
                header("location:$gourl");
            }
        }
    }
?>
